﻿import request from '/@/utils/request';
enum Api {
  AddDeviceSlaveTemplate = '/api/deviceSlaveTemplate/add',
  DeleteDeviceSlaveTemplate = '/api/deviceSlaveTemplate/delete',
  UpdateDeviceSlaveTemplate = '/api/deviceSlaveTemplate/update',
  PageDeviceSlaveTemplate = '/api/deviceSlaveTemplate/page',
  DetailDeviceSlaveTemplate = '/api/deviceSlaveTemplate/detail',
  GetDeviceTemplateInfoDeviceTemplateInfoIdDropdown = '/api/deviceSlaveTemplate/DeviceTemplateInfoDeviceTemplateInfoIdDropdown',
}

// 增加从机模板
export const addDeviceSlaveTemplate = (params?: any) =>
	request({
		url: Api.AddDeviceSlaveTemplate,
		method: 'post',
		data: params,
	});

// 删除从机模板
export const deleteDeviceSlaveTemplate = (params?: any) => 
	request({
			url: Api.DeleteDeviceSlaveTemplate,
			method: 'post',
			data: params,
		});

// 编辑从机模板
export const updateDeviceSlaveTemplate = (params?: any) => 
	request({
			url: Api.UpdateDeviceSlaveTemplate,
			method: 'post',
			data: params,
		});

// 分页查询从机模板
export const pageDeviceSlaveTemplate = (params?: any) => 
	request({
			url: Api.PageDeviceSlaveTemplate,
			method: 'post',
			data: params,
		});

// 详情从机模板
export const detailDeviceSlaveTemplate = (id: any) => 
	request({
			url: Api.DetailDeviceSlaveTemplate,
			method: 'get',
			data: { id },
		});

export const getDeviceTemplateInfoDeviceTemplateInfoIdDropdown = () =>
		request({
		url: Api.GetDeviceTemplateInfoDeviceTemplateInfoIdDropdown,
		method: 'get'
		});

